handles case of null ScalarPointer in image in
vtkMatplotlibMathTextUtilities::RenderOneCell
A null pointer was generated on s390x causing pyvista
test_add_text_latex to segfault.
See upstream #19931
https://gitlab.kitware.com/vtk/vtk/-/issues/19931
Closes: #1126861
+vtk9 (9.5.2+dfsg3-6) UNRELEASED; urgency=medium
+
+ * debian patch matplotlib_nullptr_s390x.patch handles case of null
+ ScalarPointer in image in vtkMatplotlibMathTextUtilities::RenderOneCell
+ A null pointer was generated on s390x causing pyvista
+ test_add_text_latex to segfault. Closes: #1126861
+
+ -- Drew Parsons <dparsons@debian.org> Thu, 05 Feb 2026 18:20:15 +0100
+
vtk9 (9.5.2+dfsg3-5) unstable; urgency=medium
* Team upload.
--- /dev/null
+Index: vtk9/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.cxx
+===================================================================
+--- vtk9.orig/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.cxx 2026-01-25 23:22:22.741023671 +0100
++++ vtk9/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.cxx 2026-02-05 12:10:11.414134274 +0100
+@@ -1029,6 +1029,12 @@
+ {
+ unsigned char* ptr = static_cast<unsigned char*>(image->GetScalarPointer(col, row, 0));
+
++ if (ptr == nullptr)
++ {
++ vtkErrorMacro("image returned null ScalarPointer.");
++ return false;
++ }
++
+ // Background, do not load python data
+ if (row > pythonRowStart || col < pythonColStart || row <= pythonRowEnd ||
+ col >= pythonColEnd)
100_add_missing_gl_header.patch
121_add_support_for_loong64.patch
findEXPAT_version_fix_MR12826.patch
+matplotlib_nullptr_s390x.patch